//
//  MBBaseTableCellViewModel.h
//  MemberBusiness-ios
//
//  Created by cherry pu on 2018/4/18.
//  Copyright © 2018年 zhangXin. All rights reserved.
//

#import "MBBaseViewModel.h"

typedef NSNumber * _Nonnull (^ZXTableCellViewModelCalculateBlock)(void);

@interface MBBaseTableCellViewModel : MBBaseViewModel

@property (nonatomic,strong,readonly,nullable) id dataModel; // cellViewModel会绑定一个模型实例对象
@property (nonatomic,strong,nullable) NSNumber *rowHeight; // 每个cellViewModel里面有一个实体，然后还有一个字段计算高度，缓存

/**
 cell点击的信号量监听
 */
@property (nonatomic,strong,nullable) RACSubject *cellSelectedSignal;

// cellViewModel的初始化
- (nullable instancetype)initWithDataModel:(nullable id)dataModel;

- (NSNumber *_Nonnull)cacheCellHeightWithCalculateBlock:(_Nonnull ZXTableCellViewModelCalculateBlock)calculateHeightBlock;

@end
